/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012-2013
Author : Ilya Churaev
Started : 25 Apr 2012		Updated : 29 Dec 2012
File Name : textmode.h		Purpose : test mode functions
--------------------------------------------------------------------------------------------------*/
#ifndef _TEXTMODE_H
#define _TEXTMODE_H

#ifdef __cplusplus
extern "C" {
#endif

#include <types.h>

#define PANIC(msg) panics(msg, __FILE__, __LINE__);
#define ASSERT(b) ((b) ? (void)0 : panics_assert(__FILE__, __LINE__, #b))

extern void panics(const char *message, const char *file, uint32 line);
extern void panics_assert(const char *file, uint32 line, const char *desc);

extern void cls();
extern void putch(unsigned char c);
extern void printf(unsigned char *str);
inline void ClearMoveCRS ();
extern void settextcolor(unsigned char forecolor, unsigned char backcolor);
extern void init_video();
extern void set_csr (int x, int y);
extern void paint_line (int sx, int sy, int fx, int fy, char elem);
extern void paint_point (int sx, int sy, char elem);
int GetTtyHeight ();
int GetTtyWidth ();
int GetXCoord ();
int GetYCoord ();
int GetAttribScreen ();
int print (char *str, int max);
int kprintf(const char *fmt, ...);
int kscanf(const char *fmt, ...);
char *kgets(char *str);
char *kputs(char *str);

void MessageFoS (char * message, bool success);

#ifdef __cplusplus
}
#endif

#endif
